package com.hanamaki.struct;

import java.util.Scanner;

public class ForDemo05 {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入数字：");
        int num = scanner.nextInt();
        System.out.println("根据传入的数字可以输出以下加法表：");
        for (int i = 0, j = num; i <= num; i++, j--) {
            System.out.println(i + " + " + j + " = " + (i + j));
        }
    }
}
